home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 37 / hot37.iso / FICHEROS / WEDU / MICSCOP3.ZIP / MENUSYS.CST / 00038_Script_Common Nav Code < prev    next >
Text File  |  1998-05-18  |  2KB  |  77 lines

  1. -- sent by the navigation box from each 'LessonX' cast
  2. -- sent by a 'mousedown'
  3. -- It calls various routines in 'Scripts' cast to do the navigating
  4. on NavigationBox themouse, MaxContents, MaxTests
  5.   case GetNavButton (themouse) of
  6.     #C1:
  7.       if MaxContents >= 1 then
  8.         Depress "C1 Down"
  9.         DoContent 1
  10.       end if
  11.     #C2:
  12.       if MaxContents >= 2 then
  13.         Depress "C2 Down"
  14.         DoContent 2
  15.       end if
  16.     #C3:
  17.       if MaxContents >= 3 then
  18.         Depress "C3 Down"
  19.         DoContent 3
  20.       end if
  21.     #C4:
  22.       if MaxContents >= 4 then
  23.         Depress "C4 Down"
  24.         DoContent 4
  25.       end if
  26.     #C5:
  27.       if MaxContents >= 5 then
  28.         Depress "C5 Down"
  29.         DoContent 5
  30.       end if
  31.     #T1:
  32.       if MaxTests >= 1 then
  33.         Depress "T1 Down"
  34.         DoTest 1
  35.       end if
  36.     #T2:
  37.       if MaxTests >= 2 then
  38.         Depress "T2 Down"
  39.         DoTest 2
  40.       end if
  41.     #T3:
  42.       if MaxTests >= 3 then
  43.         Depress "T3 Down"
  44.         DoTest 3
  45.       end if
  46.     #T4:
  47.       if MaxTests >= 4 then
  48.         Depress "T4 Down"
  49.         DoTest 4
  50.       end if
  51.   end case
  52. end NavigationBox
  53.  
  54. on GetNavButton APoint
  55.   if inside(Apoint, rect(436,458,451,480)) then return #C1
  56.   if inside(Apoint, rect(452,458,467,480)) then return #C2
  57.   if inside(Apoint, rect(468,458,482,480)) then return #C3
  58.   if inside(Apoint, rect(483,458,499,480)) then return #C4
  59.   if inside(Apoint, rect(500,458,516,480)) then return #C5
  60.   if inside(Apoint, rect(523,458,540,480)) then return #T1
  61.   if inside(Apoint, rect(541,458,556,480)) then return #T2
  62.   if inside(Apoint, rect(557,458,572,480)) then return #T3
  63.   if inside(Apoint, rect(573,458,599,480)) then return #T4
  64. end
  65.  
  66.  
  67. on Depress NavCastMember
  68.   -- sprite 45 has to be upgraded to the Down Button Then the Highlite Button
  69.   puppetsprite 45, true
  70.   set the member of sprite 45 to member NavCastMember
  71.   updatestage
  72.   repeat while the mouseDown
  73.   end repeat
  74.   puppetsprite 45, false   -- score takes over
  75. end Depress
  76.  
  77.